package ace.module.captcha.sms.core.impl.controller.rest.client;

import ace.cmp.core.model.R;
import ace.module.captcha.sms.core.impl.service.CaptchaSmsService;
import ace.module.captcha.sms.sdk.core.feign.impl.client.CaptchaSmsClientFeign;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Caspar open 入口
 */
@Tag(name = "短信验证码服务-OPEN-API")
@AllArgsConstructor
@RestController
@RequestMapping(CaptchaSmsClientFeign.PATH)
public class CaptchaSmsClientController implements CaptchaSmsClientFeign {

  private final CaptchaSmsService captchaSmsService;

  @Override
  public R<Void> send(Long captchaSmsAppId, String phoneNumber) {
    return this.captchaSmsService.sendNoCode(captchaSmsAppId, phoneNumber);
  }

}
